package com.deviche.view;

import android.support.annotation.NonNull;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;
import android.view.View;
import android.view.ViewGroup;

public class DouyinPagerAdapter extends FragmentPagerAdapter {

    public DouyinPagerAdapter(FragmentManager fm) {
        super(fm);

        initFragment();
    }

    VideoFragment fragment;
    AccountFragment fragment1;

    private void initFragment() {

        fragment = new VideoFragment();

        fragment1 = new AccountFragment();
    }

    @Override
    public Fragment getItem(int i) {
        return i==0?fragment:fragment1;
    }

    @Override
    public int getCount() {
        return 2;
    }



}
